14.3 Exception Handler Queueing
Upon initializing the VFS buffers, the start_kernel() process invokes the function sort_main_extable(). Certain hardware architectures allow explicit instructions to trigger hardware exceptions throughout their execution path. Diverging from standard exceptional interrupts, when these specific exceptions manifest, the program flow can transition to a designated recovery routine to resume execution. These specialized exception handlers are arranged within a bounded memory segment situated precisely between the symbols __start___ex_table and __stop___ex_table.
Certain hardware platforms mandate that these routines must be sorted in ascending order based on their memory addresses, whereas for alternative hardware architectures, sorting these procedures from lowest to highest address during the boot phase significantly accelerates runtime lookup operations. The purpose of the function sort_main_extable() is to sort the exception handlers in ascending address order if required by the underlying architecture. Strictly speaking, this specific routine bears little relation to core memory initialization; however, because the logic is exceptionally straightforward, it is briefly outlined here.